﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SingletonPattern
{
    internal class ProgramSingleton
    {
        private static void Main(string[] args)
        {
            Singleton newInstance = Singleton.getInstance();
            Console.WriteLine(string.Join(",", newInstance.getLetterList().ToArray()));

            
            Console.WriteLine("1st Instance ID: " + newInstance.GetHashCode().ToString());
            List<String> playerOneTiles = newInstance.getTiles(7);
            Console.WriteLine("Player 1: " + string.Join(",", playerOneTiles.ToArray()));
            Console.WriteLine(string.Join(",", newInstance.getLetterList().ToArray()));

            Singleton instanceTwo = Singleton.getInstance();
            Console.WriteLine("2nd Instance ID: " + instanceTwo.GetHashCode().ToString());
            List<String> playerTwoTiles = instanceTwo.getTiles(7);
            Console.WriteLine("Player 2: " + string.Join(",", playerTwoTiles.ToArray()));
            Console.WriteLine(string.Join(",", instanceTwo.getLetterList().ToArray()));
        }
    }
}